<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function sort() {
            for (var i = 0; i < arguments.length - 1; i++) {
                for (var j = 0; j < arguments.length - i - 1; j++) {
                    var num;
                    if (arguments[j] > arguments[j + 1]) {
                        num = arguments[j];
                        arguments[j] = arguments[j + 1];
                        arguments[j + 1] = num;
                    }
                }
            }
            return arguments;
        }
        var re = sort(4, 2, 6, 7, 1, );
        console.log(re);
    </script>
</head>

<body>

</body>

</html>